Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor web auth #2706

Merged
merged 8 commits into from
Nov 10, 2023
Merged

Refactor web auth #2706

merged 8 commits into from
Nov 10, 2023

Conversation

hmpf
Copy link
Contributor

@hmpf hmpf commented Nov 2, 2023

This moves things around in order to make other things easier later, and easier to grasp in general. There should be no changes in functionality.

Pre-commit's black did not agree with everything that was there before so there are some additional changes.

This PR only does the easy bits, the real difficult part is splitting up/cleaning up auth.authenticate. When that is done what's left in __init__.py can probably move to local.py or something like that.

@hmpf hmpf requested a review from lunkwill42 November 2, 2023 11:06
@hmpf hmpf self-assigned this Nov 2, 2023
@hmpf hmpf requested review from stveit and johannaengland November 2, 2023 11:07
Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Merging #2706 (6a7d097) into master (e297772) will increase coverage by 0.02%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##           master    #2706      +/-   ##
==========================================
+ Coverage   55.19%   55.21%   +0.02%     
==========================================
  Files         561      565       +4     
  Lines       40917    40942      +25     
==========================================
+ Hits        22584    22608      +24     
- Misses      18333    18334       +1     
Files Coverage Δ
python/nav/django/context_processors.py 93.47% <100.00%> (+0.14%) ⬆️
python/nav/django/settings.py 97.67% <ø> (ø)
python/nav/web/auth/ldap.py 58.58% <100.00%> (ø)
python/nav/web/navlets/__init__.py 38.75% <100.00%> (ø)
python/nav/web/modpython.py 0.00% <0.00%> (ø)
python/nav/web/webfront/views.py 35.74% <60.00%> (+0.27%) ⬆️
python/nav/web/auth/utils.py 81.25% <81.25%> (ø)
python/nav/web/auth/middleware.py 77.08% <77.08%> (ø)
python/nav/web/auth/__init__.py 78.48% <78.48%> (ø)
python/nav/web/auth/sudo.py 42.85% <42.85%> (ø)
... and 1 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link

github-actions bot commented Nov 2, 2023

Test results

     12 files       12 suites   14m 0s ⏱️
3 221 tests 3 221 ✔️ 0 💤 0
9 138 runs  9 138 ✔️ 0 💤 0

Results for commit c6ed8be.

♻️ This comment has been updated with latest results.

Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started, but wasn't able to complete my review before the weekend started, so I'll have to pick up where I left once I get back to work :)

python/nav/web/auth/sudo.py Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Nov 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a solid cleanup to me.

Got lost in docker and LDAP issues while trying to test it out, but everthing worked out in the end.

👍 👍

@hmpf hmpf merged commit 3ceacf5 into Uninett:master Nov 10, 2023
12 checks passed
@hmpf hmpf deleted the refactor-web-auth branch November 10, 2023 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants